<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>文档</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<p>
<div class="docRemark">${docRemark}</div>
</p>

#foreach($apiModule in $apiModules)
    #set($moduleIndex = ${velocityCount})
    <h1>${moduleIndex}. ${apiModule.name}</h1>
    #foreach($docItem in ${apiModule.moduleItems})
    <div id="api_item_${moduleIndex}_${velocityCount}" class="api-item">
        <h2>${moduleIndex}.${velocityCount} ${docItem.description}${docItem.version}</h2>
        <div class="doc-remark">${docItem.remark}</div>
        <div>
            <div><strong>接口名(${API_NAME})：</strong>${docItem.name}</div>
            <div><strong>版本号(${VERSION_NAME})：</strong>${docItem.version}</div>
        </div>
        <br/>
        <span>请求参数</span>
        <table>
            <tr>
                <th>名称</th>
                <th>类型</th>
                <th>是否必须</th>
                <th>示例值</th>
                <th>描述</th>
            </tr>
            #foreach($paramDefinition in ${docItem.paramDefinitions})
            ${paramDefinition.getParamHtmlPdf(${docItem.nameVersion})}
            #end
        </table>

        <span>返回结果</span>
        #if(${docItem.customWrapper})
        <table>
            <tr>
                <th>名称</th>
                <th>类型</th>
                <th>示例值</th>
                <th>描述</th>
            </tr>
            #foreach($resultDefinition in ${docItem.resultDefinitions})
            ${resultDefinition.resultHtml}
            #end
        </table>
        #else
        <table>
            <tr>
                <th>名称</th>
                <th>类型</th>
                <th>描述</th>
            </tr>
            <tr><td>${code_name}</td> <td>string</td> <td>${code_description}</td></tr>
            <tr><td>${msg_name}</td> <td>string</td> <td>${msg_description}</td></tr>
            <tr><td>${data_name}</td> <td>object</td> <td>${data_description}
                <table>
                    <tr>
                        <th>名称</th>
                        <th>类型</th>
                        <th>示例值</th>
                        <th>描述</th>
                    </tr>
                    #foreach($resultDefinition in ${docItem.resultDefinitions})
                    ${resultDefinition.resultHtml}
                    #end
                </table>
            </td></tr>
        </table>
        #end
    </div>
    #end
#end
</body>
</html>